//巧妙的利用的b=a-(a-b)
function foo(a, b) {
  a = a - b
  b = a + b
  a = b - a
  return [a, b]
}
console.log(foo(1, 2))